<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: ItemSelector</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">ItemSelector</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/app/classes/cat/item_selector_rb.html">
                app/classes/cat/item_selector.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">
    <div id="diagram">
      <map id="map" name="map">
  <area shape="rect" coords="61,101,157,149"      href="ItemSelector.html" alt="ItemSelector" />
  <area shape="rect" coords="5,5,91,53"      href="StartingRule.html" alt="StartingRule" />
  <area shape="rect" coords="115,5,227,53"      href="ItemSelectionRule.html" alt="ItemSelectionRule" />
</map>
<img src="../dot/f_7.png" usemap="#map" border="0" alt="dot/f_7.png">
    </div>

    <div id="description">
      <ul>
<li>item_selector.rb

</li>
<li>Copyright (C) 2010 Embian Inc.

<p>
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.
</p>
<p>
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
</p>
<p>
You should have received a copy of the GNU General Public License along
with This program. If not, see &lt;<a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/&gt;.
</p>
</li>
<li>Select items for starting/duaring CAT

</li>
<li>Author: KyoungMo Yang(E-mail : mo@embian.com)

</li>
<li>Modified: 2010-11-30

</li>
<li>References: <a href="StartingRule.html">StartingRule</a>, <a
href="ItemSelectionRule.html">ItemSelectionRule</a>

</li>
</ul>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000017">get_starting_point</a>&nbsp;&nbsp;
      <a href="#M000018">select_item</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->
    <div id="includes">
      <h3 class="section-bar">Included Modules</h3>

      <div id="includes-list">
        <span class="include-name"><a href="StartingRule.html">StartingRule</a></span>
        <span class="include-name"><a href="ItemSelectionRule.html">ItemSelectionRule</a></span>
      </div>
    </div>

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000017" class="method-detail">
        <a name="M000017"></a>

        <div class="method-heading">
          <a href="#M000017" class="method-signature">
          <span class="method-name">get_starting_point</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <ul>
<li>Functionailities

</li>
</ul>
<pre>
 * Returns item as CAT starting point
</pre>
<ul>
<li>Parameters

</li>
</ul>
<pre>
 * N/A
</pre>
<ul>
<li>Return

</li>
</ul>
<pre>
 * [irt_item] : IRTItem
</pre>
<ul>
<li>Note

</li>
</ul>
<pre>
 * Override Rule#run
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000017-source">
<pre>
    <span class="ruby-comment cmt"># File app/classes/cat/item_selector.rb, line 36</span>
36:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_starting_point</span>
37:     <span class="ruby-comment cmt">#TODO : UserProfile을 사용할 경우 select_item을 호출하도록 수정</span>
38:     <span class="ruby-identifier">irt_item</span> = <span class="ruby-identifier">middle_diff</span>
39:     <span class="ruby-identifier">profile</span>.<span class="ruby-identifier">exam</span>.<span class="ruby-identifier">add_item</span>(<span class="ruby-identifier">irt_item</span>)
40:     <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">irt_item</span>
41:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000018" class="method-detail">
        <a name="M000018"></a>

        <div class="method-heading">
          <a href="#M000018" class="method-signature">
          <span class="method-name">select_item</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <ul>
<li>Functionailities

</li>
</ul>
<pre>
 * Returns item that satisfies &quot;Item Selection Rule&quot;
</pre>
<ul>
<li>Parameters

</li>
</ul>
<pre>
 * N/A
</pre>
<ul>
<li>Return

</li>
</ul>
<pre>
 * [irt_item] : Returns an selected IRTItem given by rule.
</pre>
<ul>
<li>Note

</li>
</ul>
<pre>
 * Override Rule#run
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000018-source">
<pre>
    <span class="ruby-comment cmt"># File app/classes/cat/item_selector.rb, line 51</span>
51:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select_item</span>
52:     <span class="ruby-identifier">irt_item</span> = <span class="ruby-identifier">fishing_info</span>(<span class="ruby-identifier">profile</span>.<span class="ruby-identifier">theta</span>, <span class="ruby-identifier">profile</span>.<span class="ruby-identifier">exam</span>.<span class="ruby-identifier">items</span>)
53:     
54:     <span class="ruby-identifier">profile</span>.<span class="ruby-identifier">exam</span>.<span class="ruby-identifier">add_item</span>(<span class="ruby-identifier">irt_item</span>)
55:     <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">irt_item</span>
56:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>